package com.xlh.openai.service;

import com.xlh.openai.entity.WechatUserEntity;
import com.xlh.openai.vo.ConversationListVO;
import com.xlh.openai.vo.UserInfoVO;
import com.xlh.openai.vo.WechatQRcodeVO;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;

/**
 * @author chufangzheng
 */
public interface WebChatService {

    /**
     * create qrcode
     * @return
     */
    WechatQRcodeVO getQRcode(HttpSession session );

    /**
     * 微信登陆
     * @param session
     * @param sceneId
     * @return
     */
    UserInfoVO wechatIsLogin(HttpSession session, String sceneId);

    /**
     * 调用chatGpt
     * @param question
     * @return
     */
    SseEmitter chatStreamQuestion( String question,
                                   String parentMessageId,
                                   String conversationId, Integer topicId);

    /**
     * 获取会话列表
     * @return
     */
    List<ConversationListVO> conversationList();


    /**
     * 获取当前登录用户
     * @return
     */
    WechatUserEntity getCurrentUser();

    /**
     * 测试调试controller
     * @param prompt
     * @param messageId
     * @param conversationId
     * @return
     */
    SseEmitter testChatStreamQuestion(String question,
                                      String parentMessageId,
                                      String conversationId, Integer topicId);

}
